package com.itheima.d8_nested_loop;

public class Test1 {
    public static void main(String[] args) {
        // 目标：掌握嵌套循环的写法，并理解其执行流程
        // 嵌套循环的执行特点：外层循环每执行一次，内层循环执行完一轮

        for (int x = 1; x <= 9; x++) {
            for (int y = 1; y <= x; y++) {
                System.out.print(y + "*" + x + "=" + x * y + "\t");

            }
            System.out.println();

        }
        System.out.println("--------------------------");
        for (int i = 1; i <= 9; i++) {
            for (int i1 = 1; i1 <= i; i1++) {
                System.out.print("*");

            }
            System.out.println();
        }


    }
}
